home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / show_opus5 / arexx / SHOW_DT.dopus5
Text File  |  1996-08-15  |  5KB  |  192 lines

  1. /* Programm: SHOW_DT.dopus5
  2. ** $VER: SHOW_DT.dopus5 0.9 Beta (20-April-96)
  3. ** 
  4. ** 
  5. ** Needed: Directory Opus V5.xx (© by Jonathan Potter & GPSoftware)
  6. **      For MPEG: amipeg05
  7. **     optional: PeggyPlus MPEG-Card (© Ingenierbuero Helfrich)
  8. **    For AVI     : TAPAVI, CyberAVI 1.4
  9. **    For QT      : qt 1.0
  10. **    For CDXL    : cdgsxl
  11. **    For CybTV   : CyberTVPlayer
  12. **    For FLI/FLC : FLICK
  13. **    For IFF Anim: MABroadcast
  14. **
  15. **
  16. ** Copyright © 1995-1996 Eckhard Ludwig (Eckhard@top.east.de)
  17. ** SHOW_DT.dopus5 is freeware. It may be distributed freely.
  18. **
  19. ** Show video & animation from DOpus5. Only for DOpus5-filetypes,
  20. **    CyberGrafiX required
  21. **
  22. ** Call as:
  23. ** --------------------------------------------------------------------------
  24. ** (Doubleklick)   ARexx DOpus5:ARexx/SHOW_DT.dopus5 {f} {Qp} {Ql}
  25. ** --------------------------------------------------------------------------
  26. ** Set Attribut: "Run asynchron" (Asynchroner Start)
  27. **
  28. */
  29.  
  30. /*--------S E T T I N G S : -------------------------------------------
  31. ** If the file ENV:SHOW_opus5.prefs exists, that one will override the 
  32. ** settings here. Voreinstellung fuer Cybergrafix.                                                   
  33. */
  34.  
  35. /*- Path to viewer command ----------------------------------------*/
  36. MPEGP = "C:mpeg_play.020"   /* amipeg05 MPEG Softwareplayer */
  37. MPEG_OPT  = "DITHER CyberGfx MODEID 40120051" 
  38.  
  39. cdxlP = "C:cdgsxl"
  40. cdxl_opt = "dosxl blit multipal xlspeed 150 nopointer lmbabort"
  41.  
  42. CybTV = "C:CyberTVPlayer"
  43.  
  44. QTP = "C:qt"
  45. QT_OPT = "MODEID 0x40120051"
  46.  
  47. AVI1 = "C:CyberAVI"
  48. AVI1_OPT = "SOUND"
  49.  
  50. AVI2 = "C:CyberAVI"
  51. AVI2_OPT = "SOUND"
  52.  
  53. FLCP = "C:FLICK"
  54. FLC_OPT = "ROM DISK"
  55.  
  56. FLIP = "C:FLICK"
  57. FLI_OPT = "ROM DISK"
  58.  
  59. MABroadcast = "MABroadcast:MVBroadcast"
  60. MABr_OPT = "DM=CyberGFX C R=1"
  61.  
  62. parse arg '"' Titel '"' portname handle
  63.  
  64. if portname='' then
  65.    portname='DOPUS.1'
  66.  
  67. options results
  68. options failat 21
  69. lf='0a'x
  70.  
  71. Index  = 'T:PlayDOpus5Index.temp' /*Name entspricht PlayHifi.dopus5 !*/
  72.  
  73. if ~show('l','rexxsupport.library') then
  74.     call addlib('rexxsupport.library',0,-30,0)
  75.  
  76. /* init locale */
  77. if ~show(l,'locale.library') then
  78.         call addlib('locale.library',0,-30)
  79. if show(l,'locale.library') then
  80.         catalog=opencatalog('SHOW_dopus5.catalog','english',0)
  81.  
  82. if open(1,'env:SHOW_opus5.prefs','R') then do
  83.    do i=1 to 3
  84.     prefs.i = readln(1)
  85.         end
  86.    if prefs.2 ~="" then MPEGP=prefs.2
  87.    if prefs.3 ~="" then MPEG_OPT=prefs.3
  88.    drop prefs.
  89.    call close(1)
  90.    end
  91.  
  92. address value portname
  93. dopus getfiletype '"'Titel'"' id
  94. DT=result
  95.  
  96.  
  97. select
  98.   when showlist("A","MABROADCAST")=1 & DT="ANIM" then do
  99.     address command MABroadcast" "MABr_OPT" "'"'Titel'"'
  100.     exit
  101.     end
  102.  
  103.   when DT="MPEG1" then do
  104.     if showlist("A","PEGGYPLUS")=1 then do
  105.       if ~show('P','Peggy') & ~show('P','rexx_ScalaMM') then do
  106.         call pragma('STACK',8192)
  107.         address command
  108.     'RUN >NIL: <NIL: PEGGYPLUS:MPEGPlayer'
  109.         'waitforport Peggy'
  110.         address value portname
  111.         dopus front
  112.       end
  113.     end
  114.     if show('P','Peggy') then do
  115.     if exists(Index) then do
  116.            if ~delete(Index) then do
  117.            dopus front
  118.            dopus request '"'getcatstr(0,'Error:'lf'Hifi-Player or Peggy-Plus in use !')'"' getcatstr(1,'Quit')
  119.         exit
  120.        end
  121.     end
  122.       address 'Peggy'
  123.       OPEN '"'Titel'"'
  124.       'OUTPUT FULLSCREEN'
  125.       'PLAY async'
  126.       exit
  127.       end
  128.     else do
  129.         if DT="MPEG1" then do
  130.             dopus front
  131.             dopus request '"'getcatstr(3,'Error:'lf'MPEG1 (video and audio) data found !'lf'MPEG1 needed PeggyPlus MPEG-Card.')'"' getcatstr(1,'Quit')
  132.         exit 
  133.         end
  134.     end
  135.   end
  136.   when DT="MPG" then PLAYER=MPEGP
  137.   when DT="CDXL" then Player=cdxlP
  138.   when DT="YUVS" then Player=CybTV
  139.   when DT="msvc" then Player=AVI1
  140.   when DT="ulti" | DT="cvid" | DT="rle8" then Player=AVI2
  141.   when DT="QT" then Player=QTP
  142.   when DT="iv31" then do
  143.         dopus front
  144.         dopus request '"'getcatstr(4,'Error:'lf'AVI Indeo data found.'lf'Video-Format not supported !')'"' getcatstr(1,'Quit')
  145.     exit
  146.     end
  147.   when DT="FLC" then Player=FLCP
  148.   when DT="FLI" then Player=FLIP
  149.   when DT="ANIM" then Player="DOpus5:Modules/show.module"
  150.   otherwise do
  151.         dopus front
  152.         dopus request '"'getcatstr(5,'Error:'lf'Filetype not supported !')'"' getcatstr(1,'Quit')
  153.         exit
  154.         end
  155.  
  156. end
  157.  
  158. if ~exists(Player) then do
  159.     dopus front
  160.     dopus request '"'getcatstr(2,'Error:'lf'Player not found !'lf'path to command: '"'%s'"'',Player)'"' getcatstr(1,'Quit')
  161.     exit
  162.     end
  163.  
  164. call pragma('STACK',25000)
  165. address command
  166. 'setenv x11/gfxcard 1'
  167. if DT="MPG" then MPEGP" " '"'Titel'"' " "MPEG_OPT
  168. if DT="CDXL" then cdxlP" " '"'Titel'"' " "cdxl_opt
  169. if DT="YUVS" then CybTV" "||Titel
  170. if DT="msvc" then AVI1" " '"'Titel'"' " "AVI1_OPT
  171. if DT="ulti" | DT="cvid" | DT="rle8" then AVI2" " '"'Titel'"' " "AVI2_OPT
  172. if DT="QT" then QTP" " '"'Titel'"' " "QT_OPT
  173. if DT="FLC" then FLCP" "FLC_OPT" "'"'Titel'"'
  174. if DT="FLI" then FLIP" "FLI_OPT" "'"'Titel'"'
  175. address value portname
  176. if DT="ANIM" then command show '"'Titel'"'
  177.  
  178.  
  179. exit
  180.  
  181. /*--------------------------------------------------------------------------------*/
  182. getcatstr:
  183.    parse arg msgno,msgstring,insert.1,insert.2
  184.    if catalog~=0 then msgstring=getcatalogstr(catalog,msgno,msgstring)
  185.    j=0
  186.    do while pos('%s',msgstring)>0
  187.       parse var msgstring fore '%s' aft
  188.       j=j+1
  189.       msgstring=fore||insert.j||aft
  190.       end
  191.    return msgstring
  192.